import request2, { downloadGet, downloadPost } from '@/utils/request2'
import { safetyApiUrl, unionApiUrl } from '@/api/config'

export default {
  findListByMain(params, data) {
    return request2({
      url: safetyApiUrl + '/sub-evaluate/findListByMain',
      method: 'post',
      params, data
    })
  },
  getSubEvaluateVeto(params, data) {
    return request2({
      url: safetyApiUrl + '/sub-evaluate/getSubEvaluateVeto/' + params.type,
      method: 'get',
      params, data
    })
  },
  createByMain(params, data) {
    return request2({
      url: safetyApiUrl + '/sub-evaluate/createByMain',
      method: 'post',
      params, data
    })
  },
  editByMain(params, data) {
    return request2({
      url: safetyApiUrl + '/sub-evaluate/editByMain',
      method: 'post',
      params, data
    })
  },
  deleteByMain( data) {
    return request2({
      url: safetyApiUrl + '/sub-evaluate/deleteByMain',
      method: 'post',
       data
    })
  },
  findListByMainId(params, data) {
    return request2({
      url: safetyApiUrl + '/sub-evaluate/findListByMainId/' + params.id,
      method: 'get',
      params, data
    })
  },
  subContractorList(params, data) {
    return request2({
      url: safetyApiUrl + '/sub-evaluate/subContractor-list',
      method: 'post',
      params, data
    })
  }
}